<?php
// +----------------------------------------------------------------------
// | ManniuRead
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://manniuyun.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: heitao <read@manniuyun.com>
// +----------------------------------------------------------------------

namespace app\admin\validate;

use think\Validate;

class AdminAuthRule extends Validate{

    protected $rule = [
        'title'     => ['require'],
        'name'      => ['require','alphaDash'],
        'type'      => ['require'],
        'status'    => ['require'],
    ];

    protected $message  =   [
        'title.require'     => '规则标题不能为空',
        'name.require'      => '规则标识不能为空',
        'name.alphaDash'    => '规则标识只能是字母和数字，下划线 _ 及破折号 -',
        'status.require'    => '条件开关必选',
        'status.require'    => '规则状态必选',
    ];
}